]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: Remove more bogus checks
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 3 Dec 2013 20:45:53 +0000 (15:45 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 4 Dec 2013 00:13:12 +0000 (19:13 -0500)
The content in these arrays can never be null...

https://bugzilla.gnome.org/show_bug.cgi?id=719803

js/ui/background.js

index 1f9e494903e151e5d9fb54dbbc76af890b668526..0a21bd239cf48ab4dc255a2494f616ea1692f0ce 100644 (file)
@@ -50,11 +50,9 @@ const BackgroundCache = new Lang.Class({
                                         effects: Meta.BackgroundEffects.NONE });
 
         let content = null;
+
         let candidateContent = null;
         for (let i = 0; i < this._patterns.length; i++) {
-            if (!this._patterns[i])
-                continue;
-
             if (this._patterns[i].get_shading() != params.shadingType)
                 continue;
 
@@ -88,7 +86,6 @@ const BackgroundCache = new Lang.Class({
         }
 
         this._patterns.push(content);
-
         return content;
     },
 
@@ -210,11 +207,9 @@ const BackgroundCache = new Lang.Class({
                                         onFinished: null });
 
         let content = null;
+
         let candidateContent = null;
         for (let i = 0; i < this._images.length; i++) {
-            if (!this._images[i])
-                continue;
-
             if (this._images[i].get_style() != params.style)
                 continue;